package com.ftx.controller.test.spring.transactions;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * Created by fengtingxin on 2020/5/19.
 */
@Service
public class UserService {


    @Autowired
    private UserDao userDao;

    @Transactional
    public void insertUser(){
        System.out.println("插入开始");
        userDao.insert();
        System.out.println("插入完成");
        int i = 10/0;
    }

}
